﻿using System.Drawing;
using System.IO;
using System.Windows;
using System.Windows.Media.Imaging;

namespace ControleRepresentanteSync.View
{
    internal static class IconExtensionHelper
    {
        public static void SetIcon(this Window window, Icon icon)
        {
            Stream iconStream = new MemoryStream();
            icon.Save(iconStream);
            window.Icon = BitmapFrame.Create(iconStream);
        }
    }
}